import { request } from '@umijs/max';

export async function post_save_api(Req: any) {
  return request<ResponseApi.ResUnifyFormat<boolean>>('/admin/z_role_menu/saveOrUpate', {
    method: 'POST',
    data: Req,
  });
}
export async function get_api(RoleID: string) {
  return request<ResponseApi.ResUnifyFormat<any>>(
    `/admin/z_role_menu/findMenuALLTreeList?id=${RoleID}`,
    {
      method: 'GET',
    },
  );
}

export async function get_select_api(RoleID: string) {
  return request<ResponseApi.ResUnifyFormat<any>>(
    `/admin/z_role_menu/findMenuTreeList?id=${RoleID}`,
    {
      method: 'GET',
    },
  );
}
